package com.igeekhome.wzgl.controller;

import com.igeekhome.wzgl.entity.MaterialsledgerEntity;
import com.igeekhome.wzgl.service.IMaterialsledge;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/wzcx")
@CrossOrigin
public class MaterialsledgerController {
    @Autowired
    private IMaterialsledge materialsledgeEntity;
    @GetMapping("/page")
    public List<MaterialsledgerEntity> page(){
        return materialsledgeEntity.page();
    }
    @GetMapping("/brand")
    public List<MaterialsledgerEntity> brand(@RequestParam String material_brand){
        return materialsledgeEntity.brand(material_brand);
}
    @GetMapping("/type")
    public List<MaterialsledgerEntity> type(@RequestParam String material_type){
        return materialsledgeEntity.type(material_type);
    }
    @GetMapping("/model")
    public List<MaterialsledgerEntity> model(@RequestParam String material_model){
        return materialsledgeEntity.model(material_model);
    }
    @GetMapping("/select")
    public List<MaterialsledgerEntity> select(@RequestParam int id){
        return materialsledgeEntity.select(id);
    }
}
